package com.ucode.model.cgms.form;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

@Schema(description = "陪玩俱乐部社区系统 - 陪玩订单售后申请表单")
@Data
public class CgmsAfterSaleCompanionOrderApplyForm {

    @Schema(description = "订单编号", example = "1234567890", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "订单编号不能为空")
    private Long orderId;

    @Schema(description = "退货数量", example = "1", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "退货数量不能为空")
    @Min(value = 1, message = "退货数量不能小于1")
    private Integer quantity;

    @Schema(description = "售后描述", example = "服务不好，陪玩技术不行", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "售后描述不能为空")
    @Size(max = 255, message = "售后描述不能超过 255 字符")
    private String description;

    @Schema(description = "凭证图片地址数组，最多9张")
    @Size(max = 9, message = "凭证图片最多9张")
    private List<@NotBlank(message = "凭证图片不能为空") String> proofPics;

} 